package implement

import (
	"container/list"

	"github.com/gorilla/websocket"

	"net/http"
	"net/url"

	"gopkg.in/mgo.v2"
)

var TDList *list.List

type WEBSOCKET_DEVICETERMINAL_CONN struct {
	CTerminal *websocket.Conn
	CDevice   *websocket.Conn
}

var Upgrader = websocket.Upgrader{}
var Clients map[string]*websocket.Conn

var GET map[string]func(*url.URL, http.ResponseWriter, *mgo.Database)
var PUT map[string]func(*url.URL, http.ResponseWriter, []byte, *mgo.Database)
var POST map[string]func(*url.URL, http.ResponseWriter, []byte, *mgo.Database)
var DEL map[string]func(*url.URL, http.ResponseWriter, *mgo.Database)
var WSC map[string]func(string, interface{}, *websocket.Conn, *mgo.Database)
